@extends('akl.Admin.Base-index')
@section('content')
<script>
	$('#left-bar .nav>li:nth-child(3)>.menu').addClass('on');
</script>
<div class="main-menu fadeInLeft">
	<div class="title">
		<i class="fa fa-file-text-o"></i> 角色列表
	</div>
	<ul class="act-list">
		<li>
			<a href="add"><i class="fa fa-plus-square-o"></i>添加角色</a>
		</li>
	</ul>
</div>
<div class="main-wrap fadeInRight">
	<table class="tablePanel">
		<tr>
			<th>id</th>
	        <th>角色</th>
			<th>描述</th>
			<th>权限ID</th>
	        <th>操作</th>
		</tr>
		@foreach($role as $sort)
			<tr>
				<td>{{$sort->id}}</td>
				<td>{{$sort->name}}</td>
				<td>{{ $sort->description}}</td>
				<td>{{ $sort->permission_ids}}</td>


				<td><a class="act-btn" href="/Admin/Role/destroy/id/{{$sort->id}}" onclick="return confirm('确实要删除吗？')">删除</a><a class="act-btn" href="/Admin/Role/edit/id/{{$sort->id}}">编辑</a></td>
			</tr>
		@endforeach
	</table>
	<div class="pagenav">
		{{$role->links()}}
	</div>
</div>

@endsection